Passed
Push — master ( 93ca9b...d96f2b )
by Maxence
02:43
created

$(document).ready   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 1
1
/*
2
 * CMS Pico - Integration of Pico within your files to create websites.
3
 *
4
 * This file is licensed under the Affero General Public License version 3 or
5
 * later. See the COPYING file.
6
 *
7
 * @author Maxence Lange <[email protected]>
8
 * @copyright 2017
9
 * @license GNU AGPL version 3 or any later version
10
 *
11
 * This program is free software: you can redistribute it and/or modify
12
 * it under the terms of the GNU Affero General Public License as
13
 * published by the Free Software Foundation, either version 3 of the
14
 * License, or (at your option) any later version.
15
 *
16
 * This program is distributed in the hope that it will be useful,
17
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19
 * GNU Affero General Public License for more details.
20
 *
21
 * You should have received a copy of the GNU Affero General Public License
22
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
23
 *
24
 */
25
26
27
/** global: OC */
28
/** global: OCA */
29
/** global: admin_pico_elements */
30
/** global: admin_pico_result */
31
/** global: admin_pico_nav */
32
33
var admin_pico_define = {
34
	sites: '/sites/',
35
	index: '/index.php',
36
	nchost: ''
37
};
38
39
40
$(document).ready(function () {
41
42
	/**
43
	 * @constructs AdminCMSPico
44
	 */
45
	var AdminCMSPico = function () {
46
47
		$.extend(AdminCMSPico.prototype, admin_pico_nav);
48
		$.extend(AdminCMSPico.prototype, admin_pico_elements);
49
		$.extend(AdminCMSPico.prototype, admin_pico_result);
50
		$.extend(AdminCMSPico.prototype, admin_pico_define);
51
52
		this.initialize();
53
	};
54
55
56
	AdminCMSPico.prototype = {
57
58
		initialize: function () {
59
			admin_pico_define.nchost = window.location.protocol + '//' + window.location.host;
60
			admin_pico_elements.initElements();
61
			admin_pico_elements.initUI();
62
63
			admin_pico_nav.retrieveSettings();
64
		}
65
66
	};
67
68
	OCA.AdminCMSPico = AdminCMSPico;
69
	OCA.AdminCMSPico.manage = new AdminCMSPico();
70
71
});
72